statusicon: Use gtk_icon_helper_load_surface()
authorBenjamin Otte <otte@redhat.com>
Tue, 1 Dec 2015 17:31:38 +0000 (18:31 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 1 Dec 2015 23:29:30 +0000 (00:29 +0100)
This is in preparation for the next commit.

gtk/deprecated/gtkstatusicon.c

index 91fb0482f580c2906a6e99a09f2bc75a56b5b2ec..8504703bf633bc63451d6c8938b84204b3a110f6 100644 (file)
@@ -1377,6 +1377,7 @@ gtk_status_icon_update_image (GtkStatusIcon *status_icon)
   HICON prev_hicon;
 #endif
   GtkStyleContext *context;
+  cairo_surface_t *surface;
   GtkWidget *widget;
   GdkPixbuf *pixbuf;
   gint round_size;
@@ -1394,7 +1395,9 @@ gtk_status_icon_update_image (GtkStatusIcon *status_icon)
   round_size = round_pixel_size (widget, priv->size);
 
   _gtk_icon_helper_set_pixel_size (priv->icon_helper, round_size);
-  pixbuf = _gtk_icon_helper_ensure_pixbuf (priv->icon_helper, context);
+  surface = gtk_icon_helper_load_surface (priv->icon_helper, context, 1);
+  pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, round_size, round_size);
+  cairo_surface_destroy (surface);
 
   if (pixbuf != NULL)
     {